#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

bool func(int value){
    return value > 4;
}

void test(){
    vector<int> vec = {1,3,7,4,5,9,6,3,1,2,8};
    for_each(vec.begin(),vec.end(),[](int value){
             cout << value << " ";
             });
    cout <<endl;

    auto it = remove_if(vec.begin(),vec.end(),bind2nd(less<int>(),4));
    vec.erase(it,vec.end());
    for_each(vec.begin(),vec.end(),[](int value){
             cout << value << " ";
             });
    cout <<endl;
}

int main()
{
    test();
    return 0;
}

